<?

if($_POST["selbox"] != ''){
	
	if($check_me_authed == "OK"){

		$today_date 			= date("d-m-Y");
		
		$srcDbHdr			= "USERID_HDR";
    $srcDbHdrLog  = "LOG_USERID_HDR";
    $srcDbDtl     = "USERID_DTL";
    
    $UID     = unserialize($_SESSION["serUID"]);
    $userId  = $UID->getUID();

		$Db = new oracleDb;
    $Db->init($_SESSION["ORCLU"], 
              $_SESSION["OPASS"],
              $_SESSION["SID"],
              _NO_COMMENT);
    
    if ($Db->connect()) {
			
			
			if(sizeof($_POST["selbox"]) == 0){
				
				$Misc->usrDieJs("Error: nothing to be delete.\n");
			}else{
				
				foreach($_POST["selbox"] as $delThisJobId){
          
				  $tmpBuf = explode(_DEFAULT_SEPARATOR_02,
	                          $delThisJobId);
	                  
          $CLHandlers->dbEntDelete($Db,
                    	             $tmpBuf[_USER_ID],
                    	             $tmpBuf[_USER_COMPANY],
                    	             $srcDbHdr);
	            
          $CLHandlers->dbEntDelete($Db,
                    	             $tmpBuf[_USER_ID],
                    	             $tmpBuf[_USER_COMPANY],
                    	             $srcDbDtl);
	                  
			  }
			
  			$Db->commit();
  			
  			if($Db->getStatus() == true){
  
      	  $Misc->usrMsg("Delete Complete");
      	}else{
      	  
      	  $Misc->usrMsg("Delete Process Interupted");
      	}
      	
      	$Db->dc();
  			
  			//jumpTo(2,"../".$_SESSION["source_caller"]);
      }
		}else{
			
			$Misc->usrDieJs("Error: Connection to oracle Failed");
		}
	}else{
		
		$Misc->usrDieJs("Error: Connection to oracle Failed");
	}
}
?> 